<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "article".
 *
 * @property string $article_id
 * @property string $article_name
 * @property string $article_content
 * @property integer $user_id
 * @property string $created_on
 * @property string $updated_on
 * @property string $article_type
 * @property string $published_on
 */
class Article extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'article';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['article_content', 'created_on', 'updated_on'], 'required'],
            [['article_content'], 'string'],
            [['user_id', 'article_type'], 'integer'],
            [['created_on', 'updated_on', 'published_on'], 'safe'],
            [['article_name'], 'string', 'max' => 500]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'article_id' => 'Article ID',
            'article_name' => 'Article Name',
            'article_content' => 'Article Content',
            'user_id' => 'User ID',
            'created_on' => 'Created On',
            'updated_on' => 'Updated On',
            'article_type' => 'Article Type',
            'published_on' => 'Published On',
        ];
    }
}
